#pragma once
#include "pch/std_iostream.h"
#include "coordinate.hpp"
#include "point.h"

namespace BaseGeo {
    class Vector : public Coordinate {
    public:
        Vector(const Point& from, const Point& to);
        Vector(const double x, const double y);

        Vector operator-() const;

        Vector operator+(const Vector& other) const;
        Vector operator-(const Vector& other) const;
        Vector operator*(const Vector& other) const;
        Vector operator*(const double x) const;

        Vector& operator+=(const Vector& other);
        Vector& operator-=(const Vector& other);
        Vector& operator*=(const Vector& other);
        Vector& operator*=(const double x);

        double Length() const;
        double AngleWith(const Vector& other) const;
    };

    double DotMult(const Vector& vector_x, const Vector& vector_y);
    double CrossMult(const Vector& vector_x, const Vector& vector_y);

    const Vector x_unit_vector = Vector(1.0, 0.0);
}

std::ostream& operator<<(std::ostream& stream, const BaseGeo::Vector& Vector);